﻿// A ring represents one unit of time.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Orchard.Model
{
    public class Ring
    {
        Random numGenerator = new Random();

        int ringValue;
        int ringSpacing;
        DateTime ringDate;

        public Ring(DateTime date)
        {
            ringValue = 0;
            ringSpacing = 0;
            ringDate = date;
        }

        public Ring(int value, DateTime date)
        {
            //spacing is proportional to value
            ringValue = value;
            ringSpacing = value;
            ringDate = date;
        }

        public void randomizeAttributes()
        {
            //create random ring value and spacing
            ringValue = numGenerator.Next(1, 10);
            ringSpacing = ringValue;
        }

        public int Spacing
        {
            get { return ringSpacing + 1; }
            set { ringSpacing = value; }
        }

        public int Value
        {
            get { return ringValue; }
            set { ringValue = value; }
        }

        public DateTime Date
        {
            get { return ringDate; }
            set { ringDate = value; }
        }
    }
}
